Guard the changelog entry, not the composed release note - #33
Merged
Conversation
The emptiness check ran after the install section had already been appended inside the same redirect group, so release-notes.md always had content and the guard could never fire. A version missing its changelog entry would have published a release note containing nothing but install instructions. The extraction now writes its own file and is tested before composition. Verified both directions: an existing version composes notes with exactly one install section and exits 0; a version absent from the changelog exits 1 with the intended message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
[ ! -s release-notes.md ]check ran after the install heredoc had been appended inside the same redirect group, so the file was never empty and the guard could not fire. A release whose version had no changelog entry would publish a note containing only install steps.Extraction now writes
changelog-entry.mdand is tested before composition.Verified both directions rather than assuming:
VERSION=0.2.41exits 0 and produces notes with exactly one install section;VERSION=9.9.9exits 1 with the intended message. Before this change the second case exited 0.🤖 Generated with Claude Code